﻿using Coldairarrow.Entity.PB;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.PB
{
    public partial interface IPB_AreaSignInBusiness
    {
        Task<PageResult<PB_AreaSignIn>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<PB_AreaSignIn> GetTheDataAsync(string id);
        Task AddDataAsync(PB_AreaSignIn data);
        Task UpdateDataAsync(PB_AreaSignIn data);
        Task DeleteDataAsync(List<string> ids);

        /// <summary>
        /// 库区签到
        /// </summary>
        /// <param name="QrCodeJson">签到二维码</param>
        /// <returns></returns>
        Task<List<LocalMaterialSignDTO>> UpAreaSignInAsync(string QrCodeJson);

    }

    /// <summary>
    /// 签到二维码model
    /// </summary>
    public class AreaSignIn
    {
        /// <summary>
        /// 二维码请求头
        /// </summary>
        public string RHeader { get; set; }

        /// <summary>
        /// Title
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 库区Id
        /// </summary>
        public string StorAreaId { get; set; }

        /// <summary>
        /// 库区名称
        /// </summary>
        public string StorAreaName { get; set; }

        /// <summary>
        /// 库位数组
        /// </summary>
        public string[] RackNames { get; set; }

        /// <summary>
        /// 二维码生成时间
        /// </summary>
        public string DateTime { get; set; }

    }

    /// <summary>
    /// 获取库存信息model
    /// </summary>
    public class LocalMaterialSignDTO
    {
        /// <summary>
        /// 仓库Id
        /// </summary>
        public string StorId { get; set; }

        /// <summary>
        /// 仓库名称
        /// </summary>
        public string StorName { get; set; }

        /// <summary>
        /// 货位Id
        /// </summary>
        public string LocalId { get; set; }

        /// <summary>
        /// 货位名称
        /// </summary>
        public string LocalName { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 物料编号
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 库存数量
        /// </summary>
        public double? ScanNum { get; set; }

    }

}